nnoremap <silent> <F2> :NERDTreeToggle<CR>

"修改树的显示图标
"let g:NERDTreeDirArrowExpandable = '+'
"let g:NERDTreeDirArrowCollapsible = '-'

"窗口位置
"let g:NERDTreeWinPos='left'

"窗口尺寸
"let g:NERDTreeSize=30

"窗口是否显示行号
"let g:NERDTreeShowLineNumbers=1

"不显示隐藏文件
"let g:NERDTreeHidden=0

"打开vim时如果没有文件自动打开NERDTree
"autocmd vimenter * if !argc()|NERDTree|

"打开vim时自动打开NERDTree
"autocmd vimenter * NERDTree

"当NERDTree为剩下的唯一窗口时自动关闭
autocmd bufenter * if(winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
